package com.ysy.logistics.service.system;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ysy.common.resp.ResultData;
import com.ysy.logistics.entities.system.SysUser;
import com.ysy.logistics.entities.system.dto.SysUserDTO;
import com.ysy.logistics.entities.system.vo.LoginVO;
import com.ysy.logistics.entities.system.vo.RegisterVO;
import com.ysy.logistics.util.PageInfo;

/**
 * @ClassDescription:
 * @Author:姚斯羽
 * @Create:2025/3/12 14:42
 **/
public interface SysUserService extends IService<SysUser> {

    ResultData<SysUserDTO> login(LoginVO loginVO);

    ResultData<SysUserDTO> register(RegisterVO registerVO);

    /**
     * 检查用户是否存在
     * @param sysUser
     * @return
     */
    ResultData<String> existsBySysUser(SysUser sysUser);

    /**
     * 根据id获取用户信息
     * @param id
     * @return
     */
    ResultData<SysUserDTO> getUserInfoById(String id);


    Page<SysUser> listByPage(PageInfo<SysUser> pageInfo);
}
